package cn.itsource.org.domain;

import cn.hutool.core.util.DesensitizedUtil;
import cn.itsource.basic.domain.BaseDomain;
import cn.itsource.basic.domain.CreatePassword;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import javax.persistence.Transient;

@Data //生成get set方法
@Table(name = "t_employee")
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "员工对象", description = "就是个对象，别问了")
public class Employee extends BaseDomain implements CreatePassword {

    //用户名
    private String username;
    //邮箱
    private String email;
    //手机号
    private String phone;
    //盐值
    private String salt;
    //密码
    private String password;
    //确认密码
    @Transient
    private String comfirmPassword;
    //年龄
    private Integer age;
    //状态
    private Integer state;
    //部门id
    private Long departmentId;
    //没用
    private Long logininfoId;
    //店铺id
    private Long shopId;
    //父id
    private Long parentId;
    //经理id
    private Long managerId;
    //头像
    private String headImg;

    public static void main(String[] args) {
        String chineseName = DesensitizedUtil.chineseName("王天霸");
        System.out.println(chineseName);

        String s = DesensitizedUtil.idCardNum("420115199403050918", 5, 2);
        System.out.println(s);
    }
}
